/*
 * @Author: SeonHu
 * @Date: 2025-09-16 14:44:19
 * @LastEditors: SeonHu
 * @LastEditTime: 2025-09-23 14:51:42
 * @FilePath: \bg-vben\src\api\audit\auditentity\index.ts
 * @Description:
 * Copyright © 2020-2025 SANQING Corporation, All rights reserved.
 */
import type { AuditEntityOutputDto } from './model';

import type { ErrorMessageMode, PageData } from '#/request';

import { request } from '@/utils/request/axios';

import { PageRequest } from '#/request';

/** 管理-数据审计信息枚举 */
enum Api {
  /** 读取数据审计信息列表 */
  Read = '/api/admin/auditEntity/read',
}

// #region 读取数据审计信息列表
/**
 * 读取数据审计信息列表
 * @param params 分页请求
 * @param mode 错误消息模型
 */
export function readAuditEntries(params: PageRequest, mode: ErrorMessageMode = 'message') {
  return request.post<PageData<AuditEntityOutputDto>>(
    {
      url: Api.Read,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}
// #endregion
